using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
namespace Ent.SqlDB
{
    public class Executer
    {
        public Executer(string connectionString)
        {
            Connection.Set(connectionString);
        }
        public int NonQuery(string query)
        {
            return Execute.NonQuery(query);
        }
        public object Scalar(string query)
        {
            return Execute.Scalar(query);
        }
        public DataTable Reader(string query)
        {
            return Execute.Reader(query);
        }
        public NonQueryResponse NonQuery(string name, Dictionary<string, object> inParams, Dictionary<string, VSqlDbType> outParams)
        {
            return Execute.SPNonQuery(name, inParams, outParams);
        }
        public ScalarResponse Scalar(string name, Dictionary<string, object> inParams, Dictionary<string, VSqlDbType> outParams)
        {
            return Execute.SPScalar(name, inParams, outParams);
        }
        public ReaderResponse Reader(string name, Dictionary<string, object> inParams, Dictionary<string, VSqlDbType> outParams)
        {
            return Execute.SPReader(name, inParams, outParams);
        }
    }
}
